﻿using System;
using System.Collections.Generic;
using DNT.RavenQA.Core.Extensions;
using Xunit;

namespace DNT.RavenQA.Core.Tests.Extensions
{
    public class EnumerableExtensionsTests
    {
        [Fact]
        public void NullOrEmpty()
        {
            Assert.Throws<ArgumentNullException>(() =>
                                                     {
                                                         IEnumerable<Object> obj = null;
                                                         obj.IsEmpty();
                                                     });
            Assert.False(new[] { new Object() }.IsEmpty());
            Assert.True(new Object[] { }.IsEmpty());
            Assert.True(new[] { new Object() }.IsNotNullOrEmpty());
            Assert.False(new Object[] { }.IsNotNullOrEmpty());
        }
    }
}